package com.shouhuobao.take.verify;

import android.text.Html;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.AbsoluteSizeSpan;
import android.widget.TextView;

import com.iseastar.guojiang.BaseFragment;
import com.shouhuobao.station.R;

/**
 * 专业级别驿站
 */
public class RegRank3Fragment extends BaseFragment {

    private String title1 = "0基础入局快递代收、代寄业务(区域独家运营)";
    private String title2 = "专属团队支持(客服、火箭侠、运营人员、业务导师)";
    private String title3 = "社群电商体系优先入局（部分地区开通）";

    private String str1 = "<font color=#848C97>获得寄件</font><font color=#12344c>佣金</font><font color=#848C97>、代寄</font><font color=#12344c>收益</font><font color=#848C97>新业务收入、</font><font color=#12344c>免费</font><font color=#848C97>使用火箭投递快递系统</font>";
    private String str2 = "<font color=#848C97>营销活动</font><font color=#12344c>战略合作</font><font color=#848C97>资源共享，线上</font><font color=#12344c>导流、提升</font><font color=#848C97>店内</font><font color=#12344c>业绩</font><font color=#848C97>、抢占活动红利</font>";
    private String str3 = "<font color=#12344c>专属</font><font color=#848C97>团队支持、业务导师定期现场培训、定期组织交流</font>";
    private String str4 = "<font color=#848C97>安装物料用户自助使用业务、</font><font color=#12344c>省时、省心、省力</font><font color=#848C97>（自助寄件区、自助取件区、投递箱、火箭投递面单、火箭包裹专用货架）</font>";
    private String str5 = "<font color=#848C97>代收包裹</font><font color=#12344c>48小时</font><font color=#848C97>服务保障、寄件包裹服务</font><font color=#12344c>保障</font>";
    private String str6 = "<font color=#12344c>驿站+商品+社群，</font><font color=#848C97>全新体系，</font><font color=#12344c>优先</font><font color=#848C97>入局，</font><font color=#12344c>赚钱快</font><font color=#848C97>人一步！</font>";
    @Override
    protected void findViewById() {
        setContentView(R.layout.fragment_reg_rank3);
        super.findViewById();
        ((TextView) findViewById(R.id.str1_tv)).setText(Html.fromHtml(str1));
        ((TextView) findViewById(R.id.str2_tv)).setText(Html.fromHtml(str2));
        ((TextView) findViewById(R.id.str3_tv)).setText(Html.fromHtml(str3));
        ((TextView) findViewById(R.id.str4_tv)).setText(Html.fromHtml(str4));
        ((TextView) findViewById(R.id.str5_tv)).setText(Html.fromHtml(str5));
        ((TextView) findViewById(R.id.str6_tv)).setText(Html.fromHtml(str6));
        ((TextView) findViewById(R.id.title1_tv)).setText(setSpannableStr(title1, 13, title1.length()));
        ((TextView) findViewById(R.id.title2_tv)).setText(setSpannableStr(title2, 5, title2.length()));
        ((TextView) findViewById(R.id.title3_tv)).setText(setSpannableStr(title3, 9, title3.length()));
    }

    private SpannableString setSpannableStr(String content, int start, int end) {
        SpannableString spannableString = new SpannableString(content);
        AbsoluteSizeSpan sizeSpan = new AbsoluteSizeSpan(15, true);
        AbsoluteSizeSpan sizeSpan1 = new AbsoluteSizeSpan(12, true);
        spannableString.setSpan(sizeSpan, 0, start, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
        spannableString.setSpan(sizeSpan1, start + 1, end, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
        return spannableString;
    }

}
